package com.zhx.learn.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zhx.learn.component.ZhxAuth2ExceptionSerializer;
import org.springframework.http.HttpStatus;

/**
 *describe: 
 *
 *@author zhanghaixuan
 *@date 2018/12/28
 **/
@JsonSerialize(using = ZhxAuth2ExceptionSerializer.class)
public class SecurityUnloginException extends ZhxAuth2Exception{
	public SecurityUnloginException(String msg) {
		super(msg);
	}

	public SecurityUnloginException(String msg, Throwable t) {
		super(msg);
	}

	@Override
	public String getOAuth2ErrorCode() {
		return "unlogin";
	}

	@Override
	public int getHttpErrorCode() {
		return HttpStatus.UNAUTHORIZED.value();
	}
}
